package com.cyou.dream.context;

import com.cyou.dream.configuration.RuleConfig;
import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class RuleResult {

    /**
     * 规则配置信息
     */
    private final RuleConfig ruleConfig;

    /**
     * 实际的key
     */
    private final String actualKey;

    /**
     * 规则是否通过
     */
    private final boolean passed;

    /**
     * 执行时间戳
     */
    private final long executionTime;


    public RuleResult(RuleConfig ruleConfig, String actualKey, boolean passed) {
        this(ruleConfig, actualKey, passed, System.currentTimeMillis());
    }
}